package 第一章基础算法.二分.id790数的三次方根;

import java.text.DecimalFormat;
import java.util.Scanner;

/**
 * 二分，注意精度问题
 */
public class Main {
    static DecimalFormat df = new DecimalFormat("0.000000");
    public static void main(String[] args) {
        //处理输入
        Scanner scanner = new Scanner(System.in);
        double num = scanner.nextDouble();
        //求结果
        double res = findNum(-10000,10000,num);
        //处理输出
        System.out.println(df.format(res));
    }

    public static Double findNum(double l , double r, double num){
        //注意这里的 r-l>0.00000001 经验公式，保留6位小数取到1e-8次方
        while (r - l > 0.00000001){
            double mid = l + (r - l)/2.0;
            double cur = mid * mid * mid;
            if( cur < num){
                l = mid + 0.00000001;
            }else
                r = mid;
        }
        return l;
    }
}
